public class Main {
    public static void main(String[] args) {
        // 使用单例工厂类获取 Singleton 实例
        Singleton singleton1 = SingletonFactory.getInstance();
        Singleton singleton2 = SingletonFactory.getInstance();

        // 检查是否是同一个实例
        System.out.println(singleton1 == singleton2); 
    }
}
